package com.zrx.app.android.activity;

import android.support.v7.app.AppCompatActivity;
import android.text.Html;

import com.zrx.app.android.UTIL.RemoteConn;

/**
 * Created by liuji on 2017/5/15.
 */

public abstract class BaseActivity extends AppCompatActivity {
    private static final String TAG = "BaseActivity";

    protected abstract String getModuleName();

    @Override
    public void onResume(){
        super.onResume();
        RemoteConn ins = RemoteConn.getInstance();
        String subtitle=this.getModuleName();
        String titleStr = "中融信审核应用 离线中:"+(subtitle==null?"":"<font color='#ff0000'>"+subtitle+"</font>");
        if (ins != null && ins.isAuthedAndTryLogin())
            titleStr = "中融信审核应用" + (ins.isTest() ? "<font color='#ff0000'>测试版</font>" : "正式版") +(subtitle==null?"":": <font color='#ff0000'>"+subtitle+"</font>")+ ": 当前登录用户：" + ins.getEmail();
        setTitle(Html.fromHtml(titleStr));
    }

}
